home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
SNIP1292.ARJ
/
NOCTRLC.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-19
|
1KB
|
38 lines
/****************************************************************/
/* Name: noctrl() */
/* Desc: captures interrput 9 so as to ignore ctrl-c,ctrl-break,*/
/* ctrl-alt-del */
/****************************************************************/
void interrupt noctrl(void)
{
char byte;
static int flag;
extern void interrupt (*oldint9)(void);
enable();
if ((byte = inportb(0x60)) == 29)
flag = 1;
if (byte == 157)
flag = 0;
if (!flag)
(*oldint9)();
else switch (byte)
{
case 46 : /* yeah, these should be #defined! */
case 70 :
case 56 :
case 83 :
byte = inportb(0x61);
outportb(0x61,byte | 0x80);
outportb(0x61,byte);
outportb(0x20,0x20);
break;
default :
(*oldint9)();
}
}